package com.hetao.xx.activity;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.widget.ListView;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import com.hetao.xx.Global;
import com.hetao.xx.R;
import com.hetao.xx.adapter.MessageAdapter;

import java.util.ArrayList;

import butterknife.BindView;
import butterknife.ButterKnife;

public class MessageActivity extends AppCompatActivity {

    @SuppressLint("NonConstantResourceId")
    @BindView(R.id.message_list)
    ListView listView;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.fragment_main_message);
        ButterKnife.bind(this);
        Toolbar toolbar = findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        toolbar.setTitle("关于我们");

        init();
    }
    public void init() {
        ArrayList<String> msg = Global.getInstant().msgManage.getMsg();
        MessageAdapter messageAdapter = new MessageAdapter(this, R.layout.widget_msg_list_item, msg);
        listView.setAdapter(messageAdapter);
    }
}
